import http from '../../util/request.js';
var WxParse = require('../../../wxParse/wxParse.js');
Page({
  data:{
    //地图数据
    Markers: [],
    enterprise:[]
  },
  onLoad(){
    //公司信息列表
    http.get('api', {
      r:'home.configlist',
      config_group:'enterprise'
      }).then(data => {
      this.setData({ 
        enterprise: data,
        Markers: [{
          iconPath: "/resource/image/marker_red.png",
          width: 33,
          height: 40,
          latitude: data.enterprise_gc_lat,
          longitude: data.enterprise_gc_lng
        }]
         });
      WxParse.wxParse('content', 'html', this.data.enterprise.enterprise_desc, this, 3);
    });
  },
  onShow(){
    
  },
  calling(e){
    console.log(e.target.dataset.tel);
	  wx.makePhoneCall({
		phoneNumber: e.target.dataset.tel
	})
  }
  
})